#!/bin/bash

work_dir=$PWD

cd $work_dir/bin_files/cfssl

wget https://pkg.cfssl.org/R1.2/cfssl-certinfo_linux-amd64 -O cfssl-certinfo
wget https://pkg.cfssl.org/R1.2/cfssl_linux-amd64 -O cfssl
wget https://pkg.cfssl.org/R1.2/cfssljson_linux-amd64 -O cfssljson

chmod +x cfssl-certinfo cfssl cfssljson

cd $work_dir/bin_files

wget https://github.com/etcd-io/etcd/releases/download/v3.3.17/etcd-v3.3.17-linux-amd64.tar.gz
tar -zxf etcd-v3.3.17-linux-amd64.tar.gz
mv etcd-v3.3.17-linux-amd64/etcd etcd/
mv etcd-v3.3.17-linux-amd64/etcdctl etcd/
rm -rf etcd-v3.3.17-linux-amd64*

cd etcd && chmod +x etcd etcdctl
